﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using NENAData.LINQ;
using NENAData.EF;

namespace NENAData.Factory
{
    public class SQLMembership
    {
              
        /// <summary>
        /// LINQ2SQL Connection
        /// </summary>
        /// <returns></returns>
        public MembershipDataContext GetMembershipDB()
        {
            MembershipDataContext context = new MembershipDataContext(ConfigurationManager.ConnectionStrings["NENASQLConnectionString"].ConnectionString);
            return context;
        }

        /// <summary>
        /// DB StringConnection
        /// </summary>
        /// <returns></returns>
        public string GetMembershipDBString()
        {
            return ConfigurationManager.ConnectionStrings["NENASQLConnectionString"].ConnectionString;
        }

        /// <summary>
        /// EF Connection
        /// </summary>
        /// <returns></returns>
        public NENA_MembershipEntities DBConnection()
        {
            NENA_MembershipEntities context = new NENA_MembershipEntities(ConfigurationManager.ConnectionStrings["NENA_MembershipEntities"].ConnectionString);
            return context;
        }
}
}
